package com.example.development.business.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.development.business.entity.MysqlRowLock;
import com.example.development.business.mapper.MysqlRowLockMapper;
import com.example.development.business.service.MysqlRowLockService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author: vince_zww
 * @date: 2020/8/24 18:22
 * @desceription:
 */
@Service
public class MysqlRowLockServiceImpl  extends ServiceImpl<MysqlRowLockMapper, MysqlRowLock> implements MysqlRowLockService {

    @Autowired
    private MysqlRowLockMapper mapper;

    @Transactional
    @Override
    public MysqlRowLock select01(Integer id) {
//        mapper.sleep();
        return mapper.select03();
    }
}
